<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>增加用户</title>
		<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css"></link>
		<link href="css/foodstyle.css" rel="stylesheet" type="text/css"></link>
	    <link rel="stylesheet" type="text/css" href="css/default.css">
		
		<script src="js/jquery.min.js"></script>
        <script src="js/bootstrap.min.js"></script> 
	</head>
	<body style="padding-top: 20px;">
	  <div class="row">
	      <label  class="col-xs-offset-1 col-xs-2">用户名:</label>
	      <div class="col-xs-8">
	         <input type="text" class="form-control" placeholder="请输入用户名"/>
	      </div>
	   </div>
	   <div class="row">
	      <label class="col-xs-offset-1 col-xs-2">密码:</label>
	      <div class="col-xs-8">
	          <input type="password" class="form-control" placeholder="请输入密码"/>
	      </div>
	   </div>
	   <div class="row">
	      <div class="col-xs-offset-3" style="margin-top: 10px;">
	         <button type="submit" class="btn btn-primary" id="addUser_OK">确定</button>
	         <button type="button" class="btn btn-default" id="addUser_Cancel">取消</button>
	      </div>
	   </div>
	  
    
	 			
    <script>
    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
    //给父页面传值
	$('#addUser_OK').on('click', function(){
	    parent.layer.msg("添加成功！");
	    parent.layer.close(index);
	});
	
	$('#addUser_Cancel').on('click', function(){
	    parent.layer.close(index);
	});
    </script>
	</body>
</html>
